<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateSchedulingTable extends Migration
{
    /**
     * Run the migrations.
     * 排班
     * @return void
     */
    public function up()
    {
        Schema::create('scheduling', function (Blueprint $table) {
            $table->increments('id');
	        $table->integer('store_id')->comment('店铺id');
	        $table->string('type')->comment('排班类型');
	        $table->string('class_name',50)->comment('班次名称');
//	        $table->tinyInteger('sch_desc_id')->comment('排班详情id');
	        $table->tinyInteger('status')->comment('排班状态:0未排班，1已排班')->default(0);
	        $table->integer('is_agree')->comment('申请状态：1申请中，2已同意，3不通过')->default(1);
//	        $table->dateTime('scheduling_time')->comment('排班确认时间')->nullableTimestamps();
	        $table->integer('company_id')->comment('所属公司id')->nullable();
	        $table->date('start_day')->comment('排班开始日期')->nullable();
	        $table->date('end_day')->comment('排班结束日期')->nullable();

	        $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('scheduling');
    }
}
